Skip to content

Add meter transformer interfaces#142

Open
BudzikM wants to merge 6 commits intomasterfrom
Add-meter-transformer-interfaces
Open

Add meter transformer interfaces#142
BudzikM wants to merge 6 commits intomasterfrom
Add-meter-transformer-interfaces

Conversation

@BudzikM
Copy link
Contributor

@BudzikM BudzikM commented Jul 28, 2025

Add interfaces:

  • meter_transformer.get_report,
  • evt.meter_transformer.report,
  • cmd.meter_transformer.set,

to handle situations when AMS reports divided/multiplied values of the real measurements.

@BudzikM BudzikM self-assigned this Jul 28, 2025

This comment was marked as outdated.

@BudzikM BudzikM requested a review from Copilot July 28, 2025 11:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds transformer interfaces to the meter service to support configuring and retrieving transformation ratios for meter measurements. This functionality allows meters with transformers to automatically scale readings by specified ratios before reporting.

  • Adds three new meter transformer interfaces for getting, reporting, and setting transformation ratios
  • Includes documentation and examples for the new transformer functionality

BudzikM and others added 2 commits July 28, 2025 15:41
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| out | evt.meter_ext.report | float_map | | `split` | | Returns an extended electricity report. See [electricity measurements](#electricity-measurements) section for more information. |
| - | | | | | |
| in | cmd.meter_transformer.get_report | null | | | | Requests a list of transformation ratios for each measurement affected by the transformer. |
| out | evt.meter_transformer.report | float_map | | `split` | | Returns a map of transformation ratios for each measurement affected by the transformer. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no point to have storage strategy split here, we can assume that report will always contain ALL units which are transformed.

"kWh": 1,
"W": 40,
"V": 1
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

command doesn;t have split strategy, commands are not sotred

Copy link
Contributor

@boguslaw-wojcik boguslaw-wojcik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add a service param like "sup_transformation_units" or similar listing units which can have a transformation ratio.

See other commands and good to go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants